-- GENERATED SPELL FOR [Elfarran] --


function spell0_14981(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14981', 643, 1)
end

function spell1_14981(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14981', 6253, 1)
end

function spell2_14981(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14981', 5300, 1)
end

function spell3_14981(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_14981', 589, 1)
end

function spell4_14981(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_14981', 2000, 1)
end

function Sorts_14981(pUnit, Event)
local choix_sorts_14981 = math.random(0, 4)
if choix_sorts_14981 == 0 then
pUnit:RegisterEvent('spell0_14981', 1, 1)
end
if choix_sorts_14981 == 1 then
pUnit:RegisterEvent('spell1_14981', 1, 1)
end
if choix_sorts_14981 == 2 then
pUnit:RegisterEvent('spell2_14981', 1, 1)
end
if choix_sorts_14981 == 3 then
pUnit:RegisterEvent('spell3_14981', 1, 1)
end
if choix_sorts_14981 == 4 then
pUnit:RegisterEvent('spell4_14981', 1, 1)
end
end

function mob14981_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14981', math.random(1500, 3000), 1)
end

function mob14981_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14981_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14981_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14981, 1, 'mob14981_Action')
RegisterUnitEvent(14981, 2, 'mob14981_Leave')
RegisterUnitEvent(14981, 3, 'mob14981_Kill')
RegisterUnitEvent(14981, 4, 'mob14981_Die')
